﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;
using Verse.Sound;
using MVCF;
using RimWorld;

namespace Miao.Stand
{
    /// <summary>
    /// 使用定义中的能力Verb来发射
    /// </summary>
    public class Command_StandAbilityVerbTarget : CommandStandCooldown
    {
        new public StandVerbAbility ability;

        public Command_StandAbilityVerbTarget(StandAbility ability): base(ability)
        {
            this.ability = ability as StandVerbAbility;
            this.ability.verb.OnCastEnd += this.ability.StartCast;
        }

        public bool drawRadius = true;

        public override void GizmoUpdateOnMouseover()
        {
            base.GizmoUpdateOnMouseover();
            ability.def.verb.DrawRadiusRing(standPawn.Position);
        }
        public override void ProcessInput(Event ev)
        {
            base.ProcessInput(ev);
            //Targeter targeter = Find.Targeter;//射击目标
            Find.Targeter.BeginTargeting(ability.verb);
        }
    }
}
